package data;

import java.util.ArrayList;

public class GetProjects_Output {
	ArrayList<Project> projectInfo;
	String request;
	
	public GetProjects_Output(String req){
		request = req;
	}
	
	public GetProjects_Output(ArrayList<Project> in_projInfo, String req){
		projectInfo = in_projInfo;
		request = req;
	}
	
	public ArrayList<Project> getProjectInfo() {
		return projectInfo;
	}

	public void setProjectInfo(ArrayList<Project> projectInfo) {
		this.projectInfo = projectInfo;
	}

	public String getRequest() {
		return request;
	}

	public void setRequest(String request) {
		this.request = request;
	}

	@Override
	public String toString(){
		StringBuilder sb = new StringBuilder();
		if (projectInfo != null) {
			for(Project proj : projectInfo){
				sb.append(proj.getProjectID() + "\\n\n");
				sb.append(proj.getProjectTitle() + "\\n\n");
			}
		} else {
			sb.append("FALSE\\n");
		}
		
		return sb.toString();
	}
}
